import axios from "./axios"


export default {

    // 人事列表
    getPersonnelList: (data) => {
        return axios({
            method: "get",
            url: "centre/centre/adminManage/personnelList",
            params: {
                "pageNo": data.pageNo,
                "pageSize": data.pageSize,
                "name": data.name
            }
        })
    },

    // 添加或修改人事
    addPersonnel: (data) => {
        return axios({
            method: "post",
            url: "centre/centre/adminManage/personnel/addOrUpdate",
            data
        })
    },

    // 删除人事
    deletePersonnel: (id) => {
        return axios({
            method: "delete",
            url: "centre/centre/adminManage/personnel/delete/" + id,
        })
    },

    // 客户列表
    getCustomerList: (data) => {
        return axios({
            method: "get",
            url: "manage/manage/customer/toPage",
            params: {
                "pageNo": data.pageNo,
                "pageSize": data.pageSize,
                "name": data.name
            }
        })
    },

    // 添加或修改客户
    addCustomer: (data) => {
        return axios({
            method: "post",
            url: "manage/manage/customer/addOrUpdate",
            data
        })
    },

    // 删除客户
    deleteCustomer: (id) => {
        return axios({
            method: "delete",
            url: "manage/manage/customer/delete/" + id,
        })
    },

    // 用户
    getUserList: (data) => {
        return axios({
            method: "get",
            url: "manage/manage/user/toPage",
            params: {
                "pageNo": data.pageNo,
                "pageSize": data.pageSize,
                "userName": data.userName
            }
        })
    },

    addUser: (data) => {
        return axios({
            method: "post",
            url: "manage/manage/user/addOrUpdate",
            data
        })
    },

    deleteUser: (id) => {
        return axios({
            method: "delete",
            url: "manage/manage/user/delete/" + id,
        })
    },
}